package jtk.project4.fleet.ibatis.dao;

import java.sql.SQLException;
import java.util.List;

import nl.coderight.jazz.dialog.MessageDialog;
import nl.coderight.jazz.dialog.MessageType;
import jtk.project4.fleet.domain.CustLbls;
import jtk.project4.fleet.domain.VendorType;

public class CustLblsDao extends IbatisDao{
	
	public List selectCustLbls() throws SQLException {
		List selectCustLbls = null;
			selectCustLbls =getSqlMap().queryForList("SELECT_ALL_CUSTLBLS", null);
		return selectCustLbls;
	}

	public int deleteCustLbls(CustLbls custlbls) throws SQLException{
		return (int) getSqlMap().delete("DELETE_CUSTLBLS", custlbls);
	}
	
	public int updateCustLbls(CustLbls custlbls) throws SQLException{
		return (int) getSqlMap().update("UPDATE_CUSTLBLS", custlbls);
	}
	
	public CustLbls insertCustLbls(CustLbls custlbls) throws SQLException{
		return (CustLbls) getSqlMap().insert("INSERT_CUSTLBLS", custlbls);
	}

	public CustLbls insertCustLblsType(CustLbls custlbls) throws SQLException {
		return (CustLbls) getSqlMap().insert("INSERT_CUSTLBLS_TYPE",custlbls);
	}
	
		public List selectCustLblsType() throws SQLException {
		return getSqlMap().queryForList("SELECT_ALL_CUSTLBLS_TYPE", null);
	}
	
		
	public static void main (String args[]) throws SQLException{
		CustLbls custlbls;
		custlbls = new CustLbls();
		custlbls.setCustLbl1("Deden Iqyan");
		new CustLblsDao().insertCustLbls(custlbls);
	}
	
}